package com.iris.live.services.data.models;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Timestamp;

/**
 * Created by DF on 4/19/2017.
 */
@Entity
@Table(name = "t_stock_retail_import_info", schema = "iris_dev", catalog = "")
public class TStockRetailImportInfoModel {
    private Long importId;
    private String permit;
    private String vin;
    private Date openTicketDate;
    private Date changeTicketDate;
    private String sc;
    private BigDecimal carSaleAmount;
    private String salesType;
    private String mandatoryInsuranceCompany;
    private String businessInsuranceCompany;
    private BigDecimal mandatoryInsuranceAmount;
    private BigDecimal businessInsuranceAmount;
    private BigDecimal mandatoryInsurancePoundage;
    private BigDecimal businessInsurancePoundage;
    private String financialOrg;
    private BigDecimal loanAmount;
    private BigDecimal financialServiceFee;
    private BigDecimal financialPoundage;
    private BigDecimal bmbsAccessoryCost;
    private BigDecimal dealerAccessoryCost;
    private BigDecimal afterMarketGivingCost;
    private BigDecimal afterMarketSaleCost;
    private BigDecimal afterMarketSaleAmount;
    private BigDecimal extendWarrantySaleCost;
    private BigDecimal extendWarrantySaleAmount;
    private BigDecimal registrationAmount;
    private BigDecimal otherAmount;
    private BigDecimal retailSi;
    private BigDecimal wholesaleSi;
    private Timestamp updateTime;
    private String updateUserId;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "IMPORT_ID")
    public Long getImportId() {
        return importId;
    }

    public void setImportId(Long importId) {
        this.importId = importId;
    }

    @Basic
    @Column(name = "PERMIT")
    public String getPermit() {
        return permit;
    }

    public void setPermit(String permit) {
        this.permit = permit;
    }

    @Basic
    @Column(name = "VIN")
    public String getVin() {
        return vin;
    }

    public void setVin(String vin) {
        this.vin = vin;
    }

    @Basic
    @Column(name = "OPEN_TICKET_DATE")
    public Date getOpenTicketDate() {
        return openTicketDate;
    }

    public void setOpenTicketDate(Date openTicketDate) {
        this.openTicketDate = openTicketDate;
    }

    @Basic
    @Column(name = "CHANGE_TICKET_DATE")
    public Date getChangeTicketDate() {
        return changeTicketDate;
    }

    public void setChangeTicketDate(Date changeTicketDate) {
        this.changeTicketDate = changeTicketDate;
    }

    @Basic
    @Column(name = "SC")
    public String getSc() {
        return sc;
    }

    public void setSc(String sc) {
        this.sc = sc;
    }

    @Basic
    @Column(name = "CAR_SALE_AMOUNT")
    public BigDecimal getCarSaleAmount() {
        return carSaleAmount;
    }

    public void setCarSaleAmount(BigDecimal carSaleAmount) {
        this.carSaleAmount = carSaleAmount;
    }

    @Basic
    @Column(name = "SALES_TYPE")
    public String getSalesType() {
        return salesType;
    }

    public void setSalesType(String salesType) {
        this.salesType = salesType;
    }

    @Basic
    @Column(name = "MANDATORY_INSURANCE_COMPANY")
    public String getMandatoryInsuranceCompany() {
        return mandatoryInsuranceCompany;
    }

    public void setMandatoryInsuranceCompany(String mandatoryInsuranceCompany) {
        this.mandatoryInsuranceCompany = mandatoryInsuranceCompany;
    }

    @Basic
    @Column(name = "BUSINESS_INSURANCE_COMPANY")
    public String getBusinessInsuranceCompany() {
        return businessInsuranceCompany;
    }

    public void setBusinessInsuranceCompany(String businessInsuranceCompany) {
        this.businessInsuranceCompany = businessInsuranceCompany;
    }

    @Basic
    @Column(name = "MANDATORY_INSURANCE_AMOUNT")
    public BigDecimal getMandatoryInsuranceAmount() {
        return mandatoryInsuranceAmount;
    }

    public void setMandatoryInsuranceAmount(BigDecimal mandatoryInsuranceAmount) {
        this.mandatoryInsuranceAmount = mandatoryInsuranceAmount;
    }

    @Basic
    @Column(name = "BUSINESS_INSURANCE_AMOUNT")
    public BigDecimal getBusinessInsuranceAmount() {
        return businessInsuranceAmount;
    }

    public void setBusinessInsuranceAmount(BigDecimal businessInsuranceAmount) {
        this.businessInsuranceAmount = businessInsuranceAmount;
    }

    @Basic
    @Column(name = "MANDATORY_INSURANCE_POUNDAGE")
    public BigDecimal getMandatoryInsurancePoundage() {
        return mandatoryInsurancePoundage;
    }

    public void setMandatoryInsurancePoundage(BigDecimal mandatoryInsurancePoundage) {
        this.mandatoryInsurancePoundage = mandatoryInsurancePoundage;
    }

    @Basic
    @Column(name = "BUSINESS_INSURANCE_POUNDAGE")
    public BigDecimal getBusinessInsurancePoundage() {
        return businessInsurancePoundage;
    }

    public void setBusinessInsurancePoundage(BigDecimal businessInsurancePoundage) {
        this.businessInsurancePoundage = businessInsurancePoundage;
    }

    @Basic
    @Column(name = "FINANCIAL_ORG")
    public String getFinancialOrg() {
        return financialOrg;
    }

    public void setFinancialOrg(String financialOrg) {
        this.financialOrg = financialOrg;
    }

    @Basic
    @Column(name = "LOAN_AMOUNT")
    public BigDecimal getLoanAmount() {
        return loanAmount;
    }

    public void setLoanAmount(BigDecimal loanAmount) {
        this.loanAmount = loanAmount;
    }

    @Basic
    @Column(name = "FINANCIAL_SERVICE_FEE")
    public BigDecimal getFinancialServiceFee() {
        return financialServiceFee;
    }

    public void setFinancialServiceFee(BigDecimal financialServiceFee) {
        this.financialServiceFee = financialServiceFee;
    }

    @Basic
    @Column(name = "FINANCIAL_POUNDAGE")
    public BigDecimal getFinancialPoundage() {
        return financialPoundage;
    }

    public void setFinancialPoundage(BigDecimal financialPoundage) {
        this.financialPoundage = financialPoundage;
    }

    @Basic
    @Column(name = "BMBS_ACCESSORY_COST")
    public BigDecimal getBmbsAccessoryCost() {
        return bmbsAccessoryCost;
    }

    public void setBmbsAccessoryCost(BigDecimal bmbsAccessoryCost) {
        this.bmbsAccessoryCost = bmbsAccessoryCost;
    }

    @Basic
    @Column(name = "DEALER_ACCESSORY_COST")
    public BigDecimal getDealerAccessoryCost() {
        return dealerAccessoryCost;
    }

    public void setDealerAccessoryCost(BigDecimal dealerAccessoryCost) {
        this.dealerAccessoryCost = dealerAccessoryCost;
    }

    @Basic
    @Column(name = "AFTER_MARKET_GIVING_COST")
    public BigDecimal getAfterMarketGivingCost() {
        return afterMarketGivingCost;
    }

    public void setAfterMarketGivingCost(BigDecimal afterMarketGivingCost) {
        this.afterMarketGivingCost = afterMarketGivingCost;
    }

    @Basic
    @Column(name = "AFTER_MARKET_SALE_COST")
    public BigDecimal getAfterMarketSaleCost() {
        return afterMarketSaleCost;
    }

    public void setAfterMarketSaleCost(BigDecimal afterMarketSaleCost) {
        this.afterMarketSaleCost = afterMarketSaleCost;
    }

    @Basic
    @Column(name = "AFTER_MARKET_SALE_AMOUNT")
    public BigDecimal getAfterMarketSaleAmount() {
        return afterMarketSaleAmount;
    }

    public void setAfterMarketSaleAmount(BigDecimal afterMarketSaleAmount) {
        this.afterMarketSaleAmount = afterMarketSaleAmount;
    }

    @Basic
    @Column(name = "EXTEND_WARRANTY_SALE_COST")
    public BigDecimal getExtendWarrantySaleCost() {
        return extendWarrantySaleCost;
    }

    public void setExtendWarrantySaleCost(BigDecimal extendWarrantySaleCost) {
        this.extendWarrantySaleCost = extendWarrantySaleCost;
    }

    @Basic
    @Column(name = "EXTEND_WARRANTY_SALE_AMOUNT")
    public BigDecimal getExtendWarrantySaleAmount() {
        return extendWarrantySaleAmount;
    }

    public void setExtendWarrantySaleAmount(BigDecimal extendWarrantySaleAmount) {
        this.extendWarrantySaleAmount = extendWarrantySaleAmount;
    }

    @Basic
    @Column(name = "REGISTRATION_AMOUNT")
    public BigDecimal getRegistrationAmount() {
        return registrationAmount;
    }

    public void setRegistrationAmount(BigDecimal registrationAmount) {
        this.registrationAmount = registrationAmount;
    }

    @Basic
    @Column(name = "OTHER_AMOUNT")
    public BigDecimal getOtherAmount() {
        return otherAmount;
    }

    public void setOtherAmount(BigDecimal otherAmount) {
        this.otherAmount = otherAmount;
    }

    @Basic
    @Column(name = "RETAIL_SI")
    public BigDecimal getRetailSi() {
        return retailSi;
    }

    public void setRetailSi(BigDecimal retailSi) {
        this.retailSi = retailSi;
    }

    @Basic
    @Column(name = "WHOLESALE_SI")
    public BigDecimal getWholesaleSi() {
        return wholesaleSi;
    }

    public void setWholesaleSi(BigDecimal wholesaleSi) {
        this.wholesaleSi = wholesaleSi;
    }

    @Basic
    @Column(name = "UPDATE_TIME")
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "UPDATE_USER_ID")
    public String getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(String updateUserId) {
        this.updateUserId = updateUserId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TStockRetailImportInfoModel that = (TStockRetailImportInfoModel) o;

        if (importId != null ? !importId.equals(that.importId) : that.importId != null) return false;
        if (permit != null ? !permit.equals(that.permit) : that.permit != null) return false;
        if (vin != null ? !vin.equals(that.vin) : that.vin != null) return false;
        if (openTicketDate != null ? !openTicketDate.equals(that.openTicketDate) : that.openTicketDate != null)
            return false;
        if (changeTicketDate != null ? !changeTicketDate.equals(that.changeTicketDate) : that.changeTicketDate != null)
            return false;
        if (sc != null ? !sc.equals(that.sc) : that.sc != null) return false;
        if (carSaleAmount != null ? !carSaleAmount.equals(that.carSaleAmount) : that.carSaleAmount != null)
            return false;
        if (salesType != null ? !salesType.equals(that.salesType) : that.salesType != null) return false;
        if (mandatoryInsuranceCompany != null ? !mandatoryInsuranceCompany.equals(that.mandatoryInsuranceCompany) : that.mandatoryInsuranceCompany != null)
            return false;
        if (businessInsuranceCompany != null ? !businessInsuranceCompany.equals(that.businessInsuranceCompany) : that.businessInsuranceCompany != null)
            return false;
        if (mandatoryInsuranceAmount != null ? !mandatoryInsuranceAmount.equals(that.mandatoryInsuranceAmount) : that.mandatoryInsuranceAmount != null)
            return false;
        if (businessInsuranceAmount != null ? !businessInsuranceAmount.equals(that.businessInsuranceAmount) : that.businessInsuranceAmount != null)
            return false;
        if (mandatoryInsurancePoundage != null ? !mandatoryInsurancePoundage.equals(that.mandatoryInsurancePoundage) : that.mandatoryInsurancePoundage != null)
            return false;
        if (businessInsurancePoundage != null ? !businessInsurancePoundage.equals(that.businessInsurancePoundage) : that.businessInsurancePoundage != null)
            return false;
        if (financialOrg != null ? !financialOrg.equals(that.financialOrg) : that.financialOrg != null) return false;
        if (loanAmount != null ? !loanAmount.equals(that.loanAmount) : that.loanAmount != null) return false;
        if (financialServiceFee != null ? !financialServiceFee.equals(that.financialServiceFee) : that.financialServiceFee != null)
            return false;
        if (financialPoundage != null ? !financialPoundage.equals(that.financialPoundage) : that.financialPoundage != null)
            return false;
        if (bmbsAccessoryCost != null ? !bmbsAccessoryCost.equals(that.bmbsAccessoryCost) : that.bmbsAccessoryCost != null)
            return false;
        if (dealerAccessoryCost != null ? !dealerAccessoryCost.equals(that.dealerAccessoryCost) : that.dealerAccessoryCost != null)
            return false;
        if (afterMarketGivingCost != null ? !afterMarketGivingCost.equals(that.afterMarketGivingCost) : that.afterMarketGivingCost != null)
            return false;
        if (afterMarketSaleCost != null ? !afterMarketSaleCost.equals(that.afterMarketSaleCost) : that.afterMarketSaleCost != null)
            return false;
        if (afterMarketSaleAmount != null ? !afterMarketSaleAmount.equals(that.afterMarketSaleAmount) : that.afterMarketSaleAmount != null)
            return false;
        if (extendWarrantySaleCost != null ? !extendWarrantySaleCost.equals(that.extendWarrantySaleCost) : that.extendWarrantySaleCost != null)
            return false;
        if (extendWarrantySaleAmount != null ? !extendWarrantySaleAmount.equals(that.extendWarrantySaleAmount) : that.extendWarrantySaleAmount != null)
            return false;
        if (registrationAmount != null ? !registrationAmount.equals(that.registrationAmount) : that.registrationAmount != null)
            return false;
        if (otherAmount != null ? !otherAmount.equals(that.otherAmount) : that.otherAmount != null) return false;
        if (retailSi != null ? !retailSi.equals(that.retailSi) : that.retailSi != null) return false;
        if (wholesaleSi != null ? !wholesaleSi.equals(that.wholesaleSi) : that.wholesaleSi != null) return false;
        if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false;
        if (updateUserId != null ? !updateUserId.equals(that.updateUserId) : that.updateUserId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = importId != null ? importId.hashCode() : 0;
        result = 31 * result + (permit != null ? permit.hashCode() : 0);
        result = 31 * result + (vin != null ? vin.hashCode() : 0);
        result = 31 * result + (openTicketDate != null ? openTicketDate.hashCode() : 0);
        result = 31 * result + (changeTicketDate != null ? changeTicketDate.hashCode() : 0);
        result = 31 * result + (sc != null ? sc.hashCode() : 0);
        result = 31 * result + (carSaleAmount != null ? carSaleAmount.hashCode() : 0);
        result = 31 * result + (salesType != null ? salesType.hashCode() : 0);
        result = 31 * result + (mandatoryInsuranceCompany != null ? mandatoryInsuranceCompany.hashCode() : 0);
        result = 31 * result + (businessInsuranceCompany != null ? businessInsuranceCompany.hashCode() : 0);
        result = 31 * result + (mandatoryInsuranceAmount != null ? mandatoryInsuranceAmount.hashCode() : 0);
        result = 31 * result + (businessInsuranceAmount != null ? businessInsuranceAmount.hashCode() : 0);
        result = 31 * result + (mandatoryInsurancePoundage != null ? mandatoryInsurancePoundage.hashCode() : 0);
        result = 31 * result + (businessInsurancePoundage != null ? businessInsurancePoundage.hashCode() : 0);
        result = 31 * result + (financialOrg != null ? financialOrg.hashCode() : 0);
        result = 31 * result + (loanAmount != null ? loanAmount.hashCode() : 0);
        result = 31 * result + (financialServiceFee != null ? financialServiceFee.hashCode() : 0);
        result = 31 * result + (financialPoundage != null ? financialPoundage.hashCode() : 0);
        result = 31 * result + (bmbsAccessoryCost != null ? bmbsAccessoryCost.hashCode() : 0);
        result = 31 * result + (dealerAccessoryCost != null ? dealerAccessoryCost.hashCode() : 0);
        result = 31 * result + (afterMarketGivingCost != null ? afterMarketGivingCost.hashCode() : 0);
        result = 31 * result + (afterMarketSaleCost != null ? afterMarketSaleCost.hashCode() : 0);
        result = 31 * result + (afterMarketSaleAmount != null ? afterMarketSaleAmount.hashCode() : 0);
        result = 31 * result + (extendWarrantySaleCost != null ? extendWarrantySaleCost.hashCode() : 0);
        result = 31 * result + (extendWarrantySaleAmount != null ? extendWarrantySaleAmount.hashCode() : 0);
        result = 31 * result + (registrationAmount != null ? registrationAmount.hashCode() : 0);
        result = 31 * result + (otherAmount != null ? otherAmount.hashCode() : 0);
        result = 31 * result + (retailSi != null ? retailSi.hashCode() : 0);
        result = 31 * result + (wholesaleSi != null ? wholesaleSi.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        result = 31 * result + (updateUserId != null ? updateUserId.hashCode() : 0);
        return result;
    }
}
